<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>语言参考</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="configuration.changes.html">怎样修改配置设定</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="language.basic-syntax.html">基本语法</a></div>
 <div class="up"><a href="index.html">PHP 手册</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="langref" class="book">
  <h1 class="title">语言参考</h1>
  








  




 


  



 



  



 
 



  




  



  


 



  







  



 



  







  







  




 



  



 


  








  



 

 

  







  









  




 



  








 <ul class="chunklist chunklist_book"><li><a href="language.basic-syntax.html">基本语法</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="language.basic-syntax.phptags.html">PHP 标记</a></li><li><a href="language.basic-syntax.phpmode.html">从 HTML 中分离</a></li><li><a href="language.basic-syntax.instruction-separation.html">指令分隔符</a></li><li><a href="language.basic-syntax.comments.html">注释</a></li></ul></li><li><a href="language.types.html">类型</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="language.types.intro.html">简介</a></li><li><a href="language.types.boolean.html">Boolean 布尔类型</a></li><li><a href="language.types.integer.html">Integer 整型</a></li><li><a href="language.types.float.html">Float 浮点型</a></li><li><a href="language.types.string.html">String 字符串</a></li><li><a href="language.types.array.html">Array 数组</a></li><li><a href="language.types.object.html">Object 对象</a></li><li><a href="language.types.resource.html">Resource 资源类型</a></li><li><a href="language.types.null.html">NULL</a></li><li><a href="language.types.callable.html">Callback 回调类型</a></li><li><a href="language.pseudo-types.html">本文档中使用的伪类型与变量</a></li><li><a href="language.types.type-juggling.html">类型转换的判别</a></li></ul></li><li><a href="language.variables.html">变量</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="language.variables.basics.html">基础</a></li><li><a href="language.variables.predefined.html">预定义变量</a></li><li><a href="language.variables.scope.html">变量范围</a></li><li><a href="language.variables.variable.html">可变变量</a></li><li><a href="language.variables.external.html">来自 PHP 之外的变量</a></li></ul></li><li><a href="language.constants.html">常量</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="language.constants.syntax.html">语法</a></li><li><a href="language.constants.predefined.html">魔术常量</a></li></ul></li><li><a href="language.expressions.html">表达式</a></li><li><a href="language.operators.html">运算符</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="language.operators.precedence.html">运算符优先级</a></li><li><a href="language.operators.arithmetic.html">算术运算符</a></li><li><a href="language.operators.assignment.html">赋值运算符</a></li><li><a href="language.operators.bitwise.html">位运算符</a></li><li><a href="language.operators.comparison.html">比较运算符</a></li><li><a href="language.operators.errorcontrol.html">错误控制运算符</a></li><li><a href="language.operators.execution.html">执行运算符</a></li><li><a href="language.operators.increment.html">递增／递减运算符</a></li><li><a href="language.operators.logical.html">逻辑运算符</a></li><li><a href="language.operators.string.html">字符串运算符</a></li><li><a href="language.operators.array.html">数组运算符</a></li><li><a href="language.operators.type.html">类型运算符</a></li></ul></li><li><a href="language.control-structures.html">流程控制</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="control-structures.intro.html">简介</a></li><li><a href="control-structures.if.html">if</a></li><li><a href="control-structures.else.html">else</a></li><li><a href="control-structures.elseif.html">elseif/else if</a></li><li><a href="control-structures.alternative-syntax.html">流程控制的替代语法</a></li><li><a href="control-structures.while.html">while</a></li><li><a href="control-structures.do.while.html">do-while</a></li><li><a href="control-structures.for.html">for</a></li><li><a href="control-structures.foreach.html">foreach</a></li><li><a href="control-structures.break.html">break</a></li><li><a href="control-structures.continue.html">continue</a></li><li><a href="control-structures.switch.html">switch</a></li><li><a href="control-structures.declare.html">declare</a></li><li><a href="function.return.html">return</a></li><li><a href="function.require.html">require</a></li><li><a href="function.include.html">include</a></li><li><a href="function.require-once.html">require_once</a></li><li><a href="function.include-once.html">include_once</a></li><li><a href="control-structures.goto.html">goto</a></li></ul></li><li><a href="language.functions.html">函数</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="functions.user-defined.html">用户自定义函数</a></li><li><a href="functions.arguments.html">函数的参数</a></li><li><a href="functions.returning-values.html">返回值</a></li><li><a href="functions.variable-functions.html">可变函数</a></li><li><a href="functions.internal.html">内部（内置）函数</a></li><li><a href="functions.anonymous.html">匿名函数</a></li></ul></li><li><a href="language.oop5.html">类与对象</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="oop5.intro.html">简介</a></li><li><a href="language.oop5.basic.html">基本概念</a></li><li><a href="language.oop5.properties.html">属性</a></li><li><a href="language.oop5.constants.html">类常量</a></li><li><a href="language.oop5.autoload.html">自动加载对象</a></li><li><a href="language.oop5.decon.html">构造函数和析构函数</a></li><li><a href="language.oop5.visibility.html">访问控制（可见性）</a></li><li><a href="language.oop5.inheritance.html">对象继承</a></li><li><a href="language.oop5.paamayim-nekudotayim.html">范围解析操作符（::）</a></li><li><a href="language.oop5.static.html">Static（静态）关键字</a></li><li><a href="language.oop5.abstract.html">抽象类</a></li><li><a href="language.oop5.interfaces.html">对象接口</a></li><li><a href="language.oop5.traits.html">Traits</a></li><li><a href="language.oop5.overloading.html">重载</a></li><li><a href="language.oop5.iterations.html">遍历对象</a></li><li><a href="language.oop5.magic.html">魔术方法</a></li><li><a href="language.oop5.final.html">Final 关键字</a></li><li><a href="language.oop5.cloning.html">对象复制</a></li><li><a href="language.oop5.object-comparison.html">对象比较</a></li><li><a href="language.oop5.typehinting.html">类型约束</a></li><li><a href="language.oop5.late-static-bindings.html">后期静态绑定</a></li><li><a href="language.oop5.references.html">对象和引用</a></li><li><a href="language.oop5.serialization.html">对象序列化</a></li><li><a href="language.oop5.changelog.html">OOP 变更日志</a></li></ul></li><li><a href="language.namespaces.html">命名空间</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="language.namespaces.rationale.html">命名空间概述</a></li><li><a href="language.namespaces.definition.html">定义命名空间</a></li><li><a href="language.namespaces.nested.html">定义子命名空间</a></li><li><a href="language.namespaces.definitionmultiple.html">在同一个文件中定义多个命名空间</a></li><li><a href="language.namespaces.basics.html">使用命名空间：基础</a></li><li><a href="language.namespaces.dynamic.html">命名空间和动态语言特征</a></li><li><a href="language.namespaces.nsconstants.html">namespace关键字和__NAMESPACE__常量</a></li><li><a href="language.namespaces.importing.html">使用命名空间：别名/导入</a></li><li><a href="language.namespaces.global.html">全局空间</a></li><li><a href="language.namespaces.fallback.html">使用命名空间：后备全局函数/常量</a></li><li><a href="language.namespaces.rules.html">名称解析规则</a></li><li><a href="language.namespaces.faq.html">FAQ: things you need to know about namespaces</a></li></ul></li><li><a href="language.exceptions.html">异常处理</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="language.exceptions.extending.html">扩展 PHP 内置的异常处理类</a></li></ul></li><li><a href="language.generators.html">生成器</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="language.generators.overview.html">生成器</a></li><li><a href="language.generators.syntax.html">Generator syntax</a></li><li><a href="class.generator.html">Generator objects</a></li><li><a href="language.generators.comparison.html">Comparing generators with Iterator objects</a></li></ul></li><li><a href="language.references.html">引用的解释</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="language.references.whatare.html">引用是什么</a></li><li><a href="language.references.whatdo.html">引用做什么</a></li><li><a href="language.references.arent.html">引用不是什么</a></li><li><a href="language.references.pass.html">引用传递</a></li><li><a href="language.references.return.html">引用返回</a></li><li><a href="language.references.unset.html">取消引用</a></li><li><a href="language.references.spot.html">引用定位</a></li></ul></li><li><a href="reserved.variables.html">预定义变量</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="language.variables.superglobals.html">超全局变量</a> — 超全局变量是在全部作用域中始终可用的内置变量</li><li><a href="reserved.variables.globals.html">$GLOBALS</a> — 引用全局作用域中可用的全部变量</li><li><a href="reserved.variables.server.html">$_SERVER</a> — 服务器和执行环境信息</li><li><a href="reserved.variables.get.html">$_GET</a> — HTTP GET 变量</li><li><a href="reserved.variables.post.html">$_POST</a> — HTTP POST 变量</li><li><a href="reserved.variables.files.html">$_FILES</a> — HTTP 文件上传变量</li><li><a href="reserved.variables.request.html">$_REQUEST</a> — HTTP Request 变量</li><li><a href="reserved.variables.session.html">$_SESSION</a> — Session 变量</li><li><a href="reserved.variables.environment.html">$_ENV</a> — 环境变量</li><li><a href="reserved.variables.cookies.html">$_COOKIE</a> — HTTP Cookies</li><li><a href="reserved.variables.phperrormsg.html">$php_errormsg</a> — 前一个错误信息</li><li><a href="reserved.variables.httprawpostdata.html">$HTTP_RAW_POST_DATA</a> — 原生POST数据</li><li><a href="reserved.variables.httpresponseheader.html">$http_response_header</a> — HTTP 响应头</li><li><a href="reserved.variables.argc.html">$argc</a> — 传递给脚本的参数数目</li><li><a href="reserved.variables.argv.html">$argv</a> — 传递给脚本的参数数组</li></ul></li><li><a href="reserved.exceptions.html">预定义异常</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="class.exception.html">Exception</a></li><li><a href="class.errorexception.html">ErrorException</a></li></ul></li><li><a href="reserved.interfaces.html">预定义接口</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="class.traversable.html">遍历</a> — Traversable（遍历）接口</li><li><a href="class.iterator.html">迭代器</a> — Iterator（迭代器）接口</li><li><a href="class.iteratoraggregate.html">聚合式迭代器</a> — IteratorAggregate（聚合式迭代器）接口</li><li><a href="class.arrayaccess.html">数组式访问</a> — ArrayAccess（数组式访问）接口</li><li><a href="class.serializable.html">序列化</a> — 序列化接口</li><li><a href="class.closure.html">Closure</a> — Closure 类</li></ul></li><li><a href="context.html">上下文（Context）选项和参数</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="context.socket.html">套接字上下文选项</a> — 套接字上下文选项列表</li><li><a href="context.http.html">HTTP context 选项</a> — HTTP context 的选项列表</li><li><a href="context.ftp.html">FTP context options</a> — FTP context option listing</li><li><a href="context.ssl.html">SSL context options</a> — SSL context option listing</li><li><a href="context.curl.html">CURL context options</a> — CURL 上下文选项列表</li><li><a href="context.phar.html">Phar 上下文（context）选项</a> — Phar 上下文（context）选项列表</li><li><a href="context.params.html">Context 参数</a> — Context 参数列表</li></ul></li><li><a href="wrappers.html">支持的协议和封装协议</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="wrappers.file.html">file://</a> — 访问本地文件系统</li><li><a href="wrappers.http.html">http://</a> — 访问 HTTP(s) 网址</li><li><a href="wrappers.ftp.html">ftp://</a> — 访问 FTP(s) URLs</li><li><a href="wrappers.php.html">php://</a> — 访问各个输入/输出流（I/O streams）</li><li><a href="wrappers.compression.html">zlib://</a> — 压缩流</li><li><a href="wrappers.data.html">data://</a> — 数据（RFC 2397）</li><li><a href="wrappers.glob.html">glob://</a> — 查找匹配的文件路径模式</li><li><a href="wrappers.phar.html">phar://</a> — PHP 归档</li><li><a href="wrappers.ssh2.html">ssh2://</a> — Secure Shell 2</li><li><a href="wrappers.rar.html">rar://</a> — RAR</li><li><a href="wrappers.audio.html">ogg://</a> — 音频流</li><li><a href="wrappers.expect.html">expect://</a> — 处理交互式的流</li></ul></li></ul></div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="configuration.changes.html">怎样修改配置设定</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="language.basic-syntax.html">基本语法</a></div>
 <div class="up"><a href="index.html">PHP 手册</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
